
#include "zoo.h"

using namespace std;

string FoodSeller::foodkind[3] = { "peanuts","carrots","bananas" };
double FoodSeller::foodamout[3] = { 10000,7000,4000 };
double FoodSeller::foodprice[3] = { 0.2,0.3,0.5 };


int main()
{
	srand((unsigned)time(NULL));
	Zoo zoo;
	cout << "Run the zoo on the first day." << endl;
	int number_adult = rand() % 20 + 20;
	zoo.setzoo_newday(1, number_adult);
	zoo.buytickets();
	zoo.buyfood();
	zoo.fed_food();
	zoo.showall();
	zoo.check_animal_dirty();
	zoo.dayover();
	cout << endl;
	cout << "Run the zoo until it has to be closed." << endl;
	for (int i = 2; i < 20; i++)
	{
		int number_adult = rand() % 11 + 10;
		
		if (zoo.check_close() == 0)
		{
			zoo.setzoo_newday(i, number_adult);
			zoo.buytickets();
			zoo.buyfood();
			zoo.fed_food();
			zoo.check_animal_dirty();
			zoo.dayover();
		}
		else
		{
			zoo.showall();
			break;
		}
	}
	system("pause");
	return 0;
}